NewMovieTrack
You can create movie tracks by calling theNewMovieTrack
function. Immediately after creating a new track, you should call theNewTrackMedia
function to create a media for the track--a track without a media is of no use.Note that when you add a track to a movie, the Movie Toolbox automatically adjusts the display rectangle of the movie. You may want to detect these changes by calling the
GetMovieBox
function (described on page 2-147) so that you can adjust the size of the movie's display window.
pascal Track NewMovieTrack (Movie theMovie, Fixed width, Fixed height, short trackVolume);
theMovie
- Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).width
- Specifies a fixed number denoting the display width of the track, in pixels. Along with the
height
parameter, this parameter defines the track's display rectangle.height
- Specifies a fixed number denoting the display height of the track, in pixels.
- Together, the
height
andwidth
parameters define the track's display rectangle. The upper-left corner of this rectangle lies at (0,0) in the movie's rectangle. Theheight
andwidth
parameters therefore establish the lower-right corner of the track's display rectangle. If you are creating a track that is not displayed, such as a sound track, set theheight
andwidth
parameters to 0.trackVolume
- Specifies the volume setting of the track as a 16-bit, fixed-point number. The high-order 8 bits specify the integer portion; the low-order 8 bits specify the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting. Set this parameter to
kFullVolume
to play the track at its full, natural volume. Set this parameter tokNoVolume
to set the volume to 0.kFullVolume
- Sets the track to full volume (constant value is 1.0).
kNoVolume
- Sets the track to no volume (constant value is 0.0).
DESCRIPTION
TheNewMovieTrack
function returns a track identifier. If the function cannot create the track, it sets the returned identifier tonil
.ERROR CODES
Memory Manager errors
invalidMovie -2010 This movie is corrupted or invalid